|
|
|
|
|
|
|
Figure 12.13
Using the Property Pages dialog box
(which uses a TabStrip itself), you can
easily insert tabs into a TabStrip control. |
|
|
|
|
|
|
|
|
You can take advantage of this common structure by putting the data into two text files, ALEAGUE.TXT and NLEAGUE.TXT. These files contain lists of the 14 teams in each league. You can create them in Notepad or any other text editor, as shown in Figure 12.14. |
|
|
|
|
|
|
|
|
Figure 12.14
In the sample program, the TreeView is filled
with items from the two text files pictured here. |
|
|
|
|
|
|
|
|
Create the subroutine shown in Listing 12.3 to load information from the text files into the TreeView control. |
|
|
|
|
|
|
|
|
Listing 12.3 TREEVIEW.ZIPUsing the DisplayLeague Procedure to Load the Selected Information into the TreeView |
|
|
|
|
|
|
|
|
Public Sub DisplayLeague(sLeague As String)
Dim tempNode As Node
Dim nCounter As Integer
Dim sTemp As String
tv1.Nodes.Clear
'Add the League
Set tempNode = tv1.Nodes.Add(, , "R", sLeague)
'Add the Divisions
Set tempNode = tv1.Nodes.Add("R", tvwChild, "E", "East Division")
Set tempNode = tv1.Nodes.Add("R", tvwChild, "C", "Central Division")
Set tempNode = tv1.Nodes.Add("R", tvwChild, "W", "West Division") |
|
|
|
|
|